<template>
  <el-select v-model="params.channel" size="small" clearable @change="onChange">
    <el-option
      v-for="(item, index) in APPLY_STATUS"
      :key="index"
      :value="item.value"
      :label="item.label"
    ></el-option>
  </el-select>
</template>
<script>
import { APPLY_STATUS } from '@/model/type'
export default {
  model: {
    prop: 'value',
    event: 'change'
  },
  props: {
    value: {
      type: [Number, String],
      default: ''
    }
  },
  data () {
    return {
      APPLY_STATUS,
      params: {
        channel: ''
      }
    }
  },
  watch: {
    value (val) {
      this.params.channel = val
    }
  },
  created () {
    this.params.channel = this.value
  },
  methods: {
    onChange (val) {
      this.$emit('change', val)
      this.$emit('on-change', val)
    }
  }
}
</script>
